﻿using AutoMapper;
using WisDom.SmartTMS.Dto;
using WisDom.SmartTMS.Dto.BusinessAudit;
using WisDom.SmartTMS.Entity;

namespace WisDom.SmartTMS
{
    public class SmartTMSApplicationAutoMapperProfile : Profile
    {
        public SmartTMSApplicationAutoMapperProfile()
        {
            /* You can configure your AutoMapper mapping configuration here.
             * Alternatively, you can split your mapping configurations
             * into multiple profile classes for a better organization. */

            #region 从实体映射到Dto
            //人事登记
            CreateMap<PersonnelRegister, PersonnelRegisterDto>();
            CreateMap<PersonnelRegisterDto, PersonnelRegister>();

            //离职办理
            CreateMap<LeaveDeal, LeaveDealDto>();
            CreateMap<LeaveDealDto, LeaveDeal>();
            //添加
            CreateMap<LeaveDeal, LeaveDealDtoCreate>();
            CreateMap<LeaveDealDtoCreate, LeaveDeal>();

            //人事入职
            CreateMap<PersonnelEntry, PersonnelEntryDto>();
            CreateMap<PersonnelEntryDto, PersonnelEntry>();
            //添加
            CreateMap<PersonnelEntry, PersonnelEntryDtoCreate>();
            CreateMap<PersonnelEntryDtoCreate, PersonnelEntry>();

            //转正办理
            CreateMap<PositiveDeal, PositiveDealDto>();
            CreateMap<PositiveDealDto, PositiveDeal>();

            //用户
            CreateMap<Users, UsersDto>();
            CreateMap<UsersDto, Users>();
            //添加
            CreateMap<Users, UsersDtoCreate>();
            CreateMap<UsersDtoCreate, Users>();

            //承运合同
            CreateMap<TMSContractCarrier, TMSContractCarrierDto>();
            CreateMap<TMSContractCarrierDto, TMSContractCarrier>();

            #endregion
        }
    }
}
